package io;

import java.io.*;

public class PWDemo {
    public static void main(String[] args) throws IOException {
        PrintWriter pw=new PrintWriter("pw.txt");
        pw.write("和我在城都的街头走一走,哦哦哦哦");
        pw.write("直到所有的灯都熄灭了也不停留");
        System.out.println("写出完毕");
        pw.close();





        /*
        FileOutputStream fos=new FileOutputStream("pw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos);
        BufferedWriter bw=new BufferedWriter(osw);
        PrintWriter pw=new PrintWriter(bw);
        pw.write("和我在城都的街头走一走,哦哦哦哦");
        pw.write("直到所有的灯都熄灭了也不停留");
        System.out.println("写出完毕");
        bw.close();

         */









    }
}
